<?php

namespace app\forensic\model;

use think\Exception;
use think\Model;

class Sample extends Model
{
    protected $table='forensic_sample';
    /**
     * @param mixed $value
     * @return string
     * @throws \Exception
     * 格式化基因分型
     */
    public function setGenotypeAttr($value)
    {
        if (is_array($value)){
            return serialize($value);
        }else{
            return '';
        }
    }
    public function getGenotypeAttr($value)
    {
        return unserialize($value);
    }


   
}